#ifndef RS_VECTOR4_H
#define RS_VECTOR4_H

#include "Vector3.h"


namespace rs
{

//! 4D vector class.
RS_ALIGN_BEGIN(16)
class Vector4
{
//;	friend Vector4 operator*(const Matrix& lhs, const Vector4& rhs);

public:
	//! constructor.
	Vector4() {}
	Vector4(f32 x, f32 y, f32 z, f32 w);
	Vector4(const Vector3& v3, f32 w);
	Vector4(const Vector4& rhs);

	//! operators.
	Vector4& operator=(const Vector4& rhs);
	Vector4& operator+=(const Vector4& rhs);
	Vector4& operator-=(const Vector4& rhs);
	Vector4& operator*=(const Vector4& rhs);
	Vector4& operator*=(f32 rhs);
	Vector4& operator/=(const Vector4& rhs);
	Vector4& operator/=(f32 rhs);

	//! set all elements.
	void set(f32 x, f32 y, f32 z, f32 w);

	//! get each element.
	f32 getX() const;
	f32 getY() const;
	f32 getZ() const;
	f32 getW() const;

private:
	f32 x, y, z, w;
} RS_ALIGN_END(16);

// operators.
Vector4 operator+(const Vector4& lhs, const Vector4& rhs);
Vector4 operator-(const Vector4& lhs, const Vector4& rhs);
Vector4 operator*(const Vector4& lhs, const Vector4& rhs);
Vector4 operator*(const Vector4& lhs, f32 f);
Vector4 operator*(f32 f, const Vector4& rhs);
Vector4 operator/(const Vector4& lhs, const Vector4& rhs);
Vector4 operator/(const Vector4& lhs, f32 f);

} // namespace rs

// implementation
#ifdef RS_MATH_USE_C
#include "Vector4_C.h"
#endif

#endif // #ifndef RS_VECTOR4_H
